Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Adalm2k support #243

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Added Adalm2k support #243

wants to merge 7 commits into from

Conversation

SgoSkz
Copy link

@SgoSkz SgoSkz commented Jul 30, 2024

Adalm2k

Added support for the Adalm2k.
Initial support was written but never finished #97
Requires libiio v1.0

Features

  • 16 Digital Inputs
  • 100M sampling rate

Missing

  • Support for real time sampling
  • Analog support
  • Changing trigger method

Tested

  • 1kHz square wave @ 100M 10M 1M 100k 10k
  • Disabling/Enabling channels
  • N/A

Bugs

  • If the number of samples is too large, the buffer will fail to send
  • Unknown

@SgoSkz SgoSkz changed the title Adalm2k Added Adalm2k support Jul 30, 2024
@biot
Copy link
Contributor

biot commented Sep 28, 2024

A few notes:

  • The whitespace is all over the place in your code, looks like a mix of tabs and spaces. Also other clashing coding styles, like no space after keywords etc. Please check https://github.com/sigrokproject/libsigrok/blob/master/HACKING
  • There's still lots of debug/TODO stuff in the code, to the point that it seems unfinished. It's fine to submit a driver that doesn't implement everything yet (I'd expect it, with hardware this versatile), but just leave the TODO, dead code etc stuff out. The thing to do is submit finished features, not leave half-finished things in the code.
  • I'm not sure I get the dependency on libiio here. What does it bring to the table that you can't do with regular libusb calls, like every other libsigrok USB-using driver? It doesn't look to me like the kernel iio subsystem knows about the adalm2k at all, so what's libiio do for you? I'd like to avoid pulling in a libiio dependency if it's superfluous.

@SgoSkz
Copy link
Author

SgoSkz commented Oct 2, 2024

Alright, note taken. I will be updating the code when I have the time.
In regards to libiio, I have no clue how to use libusb calls at this current moment (please let me know if you have any helpful resources to getting started), and it also helps with setting up the device, such as setting up buffer size, sample rate, enable/disable channels, setting up triggers, etc.
Thank you for your feedback!

@biot
Copy link
Contributor

biot commented Oct 2, 2024

The libusb docs of course, but most of all check the code in other sigrok drivers. Lots of them use libusb to interface with the hardware.

@biot biot mentioned this pull request Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants